package QL;

import java.util.List;
import java.util.ArrayList;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;

public class ButlerGuildInfo implements IQLResponse
{
    /// <summary>
    /// 公会Id
    /// </summary>
    public long GuildId;

    /// <summary>
    /// 公会名称
    /// </summary>
    public String GuildName;

    /// <summary>
    /// 会长Id
    /// </summary>
    public long UserId;

    /// <summary>
    /// 会长昵称
    /// </summary>
    public String Nickname;

    /// <summary>
    /// 公会等级
    /// </summary>
    public long GuildLevel;

    /// <summary>
    /// 公会人数
    /// </summary>
    public long GuildMemberCount;

    /// <summary>
    /// 公会红包实时额度
    /// </summary>
    public long GuildRedpacketPool;

    /// <summary>
    /// 公会玩家金币总消耗
    /// </summary>
    public long GuildMembersCost;

    /// <summary>
    /// 会长福利实时额度
    /// </summary>
    public long GuildWelfare;

    /// <summary>
    /// 公会创建时间
    /// </summary>
    public String CreateTime;

    /// <summary>
    /// 推荐列表显示级别 0默认 1已屏蔽 2已上榜 3已置顶
    /// </summary>
    public long DisplayLevel;

    @Override
    public void DeserializeFromJson(JSONObject jsonObj)
    {
        JSONObject t = jsonObj;
        if (t.has("guild_id"))
            GuildId = t.getLong("guild_id");
        if (t.has("guild_name"))
            GuildName = t.getString("guild_name");
        if (t.has("user_id"))
            UserId = t.getLong("user_id");
        if (t.has("nickname"))
            Nickname = t.getString("nickname");
        if (t.has("guild_level"))
            GuildLevel = t.getLong("guild_level");
        if (t.has("guild_member_count"))
            GuildMemberCount = t.getLong("guild_member_count");
        if (t.has("guild_redpacket_pool"))
            GuildRedpacketPool = t.getLong("guild_redpacket_pool");
        if (t.has("guild_members_cost"))
            GuildMembersCost = t.getLong("guild_members_cost");
        if (t.has("guild_welfare"))
            GuildWelfare = t.getLong("guild_welfare");
        if (t.has("create_time"))
            CreateTime = t.getString("create_time");
        if (t.has("display_level"))
            DisplayLevel = t.getLong("display_level");
    }
}
